package com.seed.dev;

import com.seed.core.pojo.seed.Seed;
import com.seed.dev.web.user.UserController;
import com.seed.util.ToSeedKit;
import org.springframework.boot.CommandLineRunner;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Component
public class DevInitializer1 implements CommandLineRunner {
    private final ApplicationContext applicationContext;

    public DevInitializer1(ApplicationContext applicationContext) {
        this.applicationContext = applicationContext;
    }

    @Override
    public void run(String... args) {
//        SpringManager.setApplicationContext(applicationContext);
        List<Class<?>> controllerList = List.of(UserController.class);
        Map<String, Seed> seeds = ToSeedKit.toSeeds(controllerList);

//        String appName = "seed-dev";
//        App app = new App();
//        app.setName(appName);
//        app.setMicro(new Micro(seeds, null));
//        Initializer.ddl.run(seeds);
//        A.setApp(app);
    }
}
